<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>您有新的红包</title>
    <script src="jquery-3.5.1.min.js"></script>
    <style>
        html{
            width:100%;
            height:100%;
            font-family: "楷体";
        }
        body{
            width:100%;
            margin: 0px;
            height: 100%;
        }
        #div1,#div2{
            background-color:#c34435;
            display: block;
            text-align: center;
        }
        #div2,#div3,#div4{
            display: none;
        }
        div{
            margin:0px;
            width:100%;
            height: 100%;
        }
        #z{
            height:24%;
            color: #c34435;
        }
        #div1 span:not(#z){
            color: #ebcd99;
            position: fixed;
            height:16px;
            width:96px;
            top:25%;
        }
        #div1 svg{
            width:100%;
            height:50%;
            color:white;
            text-align: center;
            font-family: "楷体";
            font-size: 40px;
        }
        #div4 video{
            width: 100%;
            height: 100%;
        }
    </style>
</head>
<body>
    <div id="div1">
        <div id="z"></div>
        <img src="icon.jpg" width="25px" height="25px">
        <span>龙龙(新号)的红包</span>
        <span id="z">龙龙(新号)的红包</span>
        <div id="z"></div>
        <svg>
            <!--<path id="path_1" stroke="#f25542" fill="#f25542"></path>-->
        </svg>
    </div>
    <div id="div2">
        <div id="z"></div>
        请输入以下内容<br>名字<input type="text"><br><button onclick="op()"></button>
    </div>
    <div id="div3">恭喜获得<span id="asd"></span>元</div>
    <div id="div4">
        <video src="video.mp4" style="display: block;"></video>
    </div>
    <script>
        console.log(document.querySelector("svg"))
        $("svg")[0].innerHTML = "<path d=\"M0 0 C 0 0, "+innerWidth/2+" 50, "+innerWidth+" 0 L"+innerWidth+" "+innerHeight/2+"L0 "+innerHeight/2+"\" stroke=\"#f25542\" fill=\"#f25542\"></path>\
            <circle cx="+innerWidth/2+" cy=\"50\" r=\"40\" stroke=\"#ebcd99\" stroke-width=\"2\" fill=\"#ebcd99\"/ onclick = \"ope()\"></circle>\
            <text x="+((innerWidth/2)-20)+" y=\"60\" fill=\"#FFF\" onclick = \"ope()\">开</text>\
        "
        function ope(){
            $("#div1")[0].style.display = "none"
            $("#div2")[0].style.display = "block"
        }
        function op(){
            $("#div2")[0].style.display = "none"
            $("#div4")[0].style.display = "block"
            $("video")[0].style.display = "block"
            $("video")[0].play()
            setTimeout(()=>{$("#div4")[0].style.display = "none"
            $("#div3")[0].style.display = "block"
            setTimeout(()=>{
                $("#asd")[0].innerText = Math.random()
                setTimeout(()=>{
                $("#asd")[0].innerText = Math.random()
                setTimeout(()=>{
                $("#asd")[0].innerText = Math.random()
                setTimeout(()=>{
                $("#asd")[0].innerText = Math.random()
                setTimeout(()=>{
                $("#asd")[0].innerText = Math.random()
                setTimeout(()=>{
                $("#asd")[0].innerText = Math.random()
                setTimeout(()=>{
                $("#asd")[0].innerText = Math.random()
                setTimeout(()=>{
                $("#asd")[0].innerText = Math.random()
                setTimeout(()=>{
                $("#asd")[0].innerText = Math.random()
                setTimeout(()=>{
                $("#asd")[0].innerText = Math.random()
                var ii = Math.random()
            $("#asd")[0].innerText = ii
            $.get("/"+ii+"/"+$("input")[0].value)
            setTimeout(() => {
                window.close()
            }, 10000);
            },1000)
            },1000)
            },1000)
            },1000)
            },1000)
            },1000)
            },1000)
            },1000)
            },1000)
            },1000)},39000)
        }
    </script>
</body>
</html>